export interface DataItem {
  name: string;
  id: string | number;
}

export const propsObj = {
  value: {
    type: Array as PropType<DataItem[]>,
  },
  fieldKey: {
    type: String,
    default: 'id',
  },
  fieldTitle: {
    type: String,
    default: 'name',
  },
  params: {
    type: Object,
    default: () => {},
  },
  disabled: {
    type: Boolean,
    default: false,
  },
  title: {
    type: String,
    default: '选择组件',
  },
  api: {
    type: Function as PropType<PromiseFn>,
    default: null,
  },
};
